<?php

include_once 'core/Node.php';
include_once 'core/HTMLInterpreter.php';

class GeneralInterpreter extends HTMLInterpreter{

	public function interpret(Node $node){
		$ret = parent::interpret($node);

		if($ret == ''){
			$name = $node->getAttribute('#');

			if('' != $name){
				$ret = '<div data-role="'.$name.'">';
			}
			
			$ret .= parent::iterate($node);

			if('' != $name){
				$ret .= '</div>';
			}				
		}
		return $ret;
	}
}